"""gma URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URL conf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""

from django.conf.urls import url

from apps.mweb import views

urlpatterns = [
    # 手机端官网: 支付列表页面
    url(r'^pay/(?P<uid>\d+)/(?P<ptype>.+)/list/$', views.pay_list, name='pay_list'),
    # 手机端官网: 支付确认页面
    url(r'^pay/(?P<uid>\d+)/(?P<rmb>\d+)/(?P<ptype>.+)/confirm/', views.confirm, name='confirm'),

    # 手机端官网: 微信充值页面
    url(r'^wp/(?P<uid>\d+)/(?P<rmb>\d+)/$', views.pay_with_wx, name='pay_with_wx'),
    # 手机端官网: 支付宝充值页面
    # url(r'^ap/(?P<uid>\d+)/(?P<rmb>\d+)/$', views.pay_with_uni_alipay, name='pay_with_uni_alipay'),
    url(r'^ap/(?P<uid>\d+)/(?P<rmb>\d+)/$', views.pay_with_official_alipay, name='pay_with_uni_alipay'),
    # 手机端官网: 支付宝官方充值页面
    url(r'^ap2/(?P<uid>\d+)/(?P<rmb>\d+)/$', views.pay_with_official_alipay, name='pay_with_official_alipay'),

    # 银联: 公众号充值
    url(r'^up/(?P<uid>\d+)/(?P<rmb>\d+)/$', views.pay_with_unipay_mp, name='pay_with_unipay_mp'),
    # 银联: 支付宝H5充值
    # url(r'^up_h5_ali/(?P<uid>\d+)/(?P<rmb>\d+)/$', views.pay_with_unipay_ali, name='pay_with_unipay_ali'),

    # 手机端官网: 充值接口
    url(r'^api/pay/$', views.api_pay, name='api_pay'),

    # 规则: 兑换规则
    url(r'^rule/exchange/$', views.exchange_rule, name='exchange_rule'),
    # 规则: 实名认证规则
    url(r'^rule/identity/$', views.identity_rule, name='identity_rule'),
    # 规则: 用户协议
    url(r'^agreement/user/$', views.user_agreement, name='user_agreement'),
    # 规则: 隐私协议
    url(r'^agreement/privacy/$', views.privacy_agreement, name='privacy_agreement'),
    # 规则: 常见问题
    url(r'^faq/$', views.faq, name='faq'),
    # 规则: 砸金蛋规则
    url(r'^rule/egg/$', views.egg, name='egg'),
    # 规则: 砸蛋规则
    url(r'^rule/egg/(?P<egg_type>\d+)/$', views.egg, name='egg'),

    # 预注册
    url(r'^registration/(?P<app>\w+)/(?P<channel>\w+)/$', views.registration, name='registration'),
    # 预注册2
    url(r'^registration/(?P<app>\w+)/(?P<channel>\w+)/v2/$', views.registration_v2, name='registration_v2'),
    # Api: 获取验证码
    url(r'^api/smscode/$', views.api_fetch_smscode, name='api_fetch_smscode'),
    # Api: 注册
    url(r'^api/user_register/$', views.api_user_register, name='api_user_register'),

    # 显示banner
    url(r'^banner/(?P<banner_id>\d+)/$', views.banner, name='banner'),

    # # 圣诞活动
    # url(r'^activity/christmas/(?P<uid>\d+)/(?P<token>\w+)/$', views.activity_christmas, name='activity_christmas'),
    # 每日签到活动
    url(r'^activity/daily_sign/(?P<uid>\d+)/(?P<token>\w+)/(?P<env>\w+)/$', views.activity_daily_sign, name='activity_daily_sign'),
    # 新年活动
    url(r'^activity/chinese_new_year/(?P<uid>\d+)/(?P<token>\w+)/(?P<env>\w+)/$', views.activity_chinese_new_year, name='activity_chinese_new_year'),

    # 测试
    url(r'^test/$', views.test, name='test'),

    # 公会入口
    url(r'^guild/$', views.guild_entry, name='guild_entry'),
    # 管理后台入口
    url(r'^hba/$', views.hba_entry, name='hba_entry'),
]
